//
//  PhotosUploadManager.h
//  Scanner
//
//  Created by apple on 15-5-16.
//  Copyright (c) 2015年 米明. All rights reserved.
//

#import "LYObject.h"
#import "UploadTask.h"

#import "CoreDataManager.h"

#define RETURN_RET @"ret"
#define RETURN_DATA @"data"
#define Delete_Url @"http://182.254.221.46:8081/index/deleteImg"
#define FIND_GOODS_URL @"http://182.254.221.46:8081/index/find"
#define BASE_URL @"http://182.254.221.46:8081"
#define kValue 0.54
@interface PhotosUploadManager : LYObject

//未完成的任务
@property(nonatomic,strong)NSMutableDictionary * tasks;
//已完成的任务
@property(nonatomic,strong)NSMutableDictionary * succeedTasks;

@property(nonatomic,assign)BOOL running;//正在进行


+(PhotosUploadManager *)manager;

//增加一个任务
-(void)addOneTask:(UploadTask *)task;

//删除一个任务
-(void)removeTask:(UploadTask *)task;

-(void)deletePhotoWithGoodsId:(NSString *)goodsId uri:(NSString *)uri  callBack:(void (^)(BOOL succeed))callBack;

-(UploadTask *)creatOneTaskWithPhoto:(UIImage *)photo goods:(Goods *)goods;

-(UploadTask *)creatOneTaskWithPhotoPath:(NSString *)photoPath goods:(Goods *)goods;

-(NSMutableArray *)getOrderTasks;

-(void)stopRun;

-(void)startRun;

-(void)clean;




@end
